<%@page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@include file="/includes/taglibs.jsp"%>
<%@page import="com.feib.stms.action.Stms9012ActionBean"%>
<%@page import="com.feib.stms.pagination.PaginatedList"%>
<%
// 欄位排序處理
Stms9012ActionBean actionBean = (Stms9012ActionBean) request.getAttribute("actionBean");
if (null != actionBean && null != actionBean.getQueryResult())
{
	PaginatedList queryResult = actionBean.getQueryResult();
	
	int sortDirection = queryResult.getSortDirection();  //2 : ascending, else: descending
	String sortSpan = "<span class=\"ui-icon ui-icon-circle-triangle-n\"></span>"; //由小到大
	if (1 == sortDirection)
	{
		sortSpan = "<span class=\"ui-icon ui-icon-circle-triangle-s\"></span>"; //由大到小
	}
	
	String sortCriterion = queryResult.getSortCriterion();
	if (null != sortCriterion && 0 != sortCriterion.length())
	{
		/* 操作時間 */
		if ("inDateTime".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("inDateTimeSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("inDateTimeSortedSpan", sortSpan);
		}
		/* 功能模組 */
		else if ("parentActionName".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("parentActionNameSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("parentActionNameSortedSpan", sortSpan);
		}
		/* 功能名稱 */
		else if ("actionName".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("actionNameSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("actionNameSortedSpan", sortSpan);
		}
		/* 操作內容 */
		else if ("eventName".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("eventNameSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("eventNameSortedSpan", sortSpan);
		}
		/* 來源IP */
		else if ("remoteAddr".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("remoteAddrSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("remoteAddrSortedSpan", sortSpan);
		}
		/* 使用者ID */
		else if ("userId".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("userIdSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("userIdSortedSpan", sortSpan);
		}
		/* 分公司 */
		else if ("securities".equalsIgnoreCase(sortCriterion))
		{
			pageContext.setAttribute("securitiesSortedClass", 1==sortDirection?"sortDesc":"sortAsc");
			pageContext.setAttribute("securitiesSortedSpan", sortSpan);
		}		
	}
	
	/* 上下頁鈕處理 */
	int lastPageNumber = queryResult.getTotalPageCount();
	int currentPageNumber = queryResult.getPageNumber();
	int prePageNumber = currentPageNumber - 1;
	int nextPageNumber = currentPageNumber + 1;
	
	pageContext.setAttribute("lastPageNumber", new Integer(lastPageNumber));
	pageContext.setAttribute("currentPageNumber", new Integer(currentPageNumber));
	pageContext.setAttribute("prePageNumber", new Integer(prePageNumber));
	pageContext.setAttribute("nextPageNumber", new Integer(nextPageNumber));
} // end of if (null != actionBean && null != actionBean.getQueryResult())

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
            
    <script type="text/javascript">

    <!-- 
    $(document).ready(function() {
    	$('#doQueryBtn').click(function() {
    		var qryOperationDateFrom = $('#qryOperationDateFrom').val();
    		var qryOperationDateHourFrom = $('#qryOperationDateHourFrom').val();
    		var qryOperationDateTo = $('#qryOperationDateTo').val();
    		var qryOperationDateHourTo = $('#qryOperationDateHourTo').val();
    		var qryUserId = $('#qryUserId').val();
    		var errorMessage = '';
    		
    		if (qryOperationDateFrom == '') errorMessage = '操作日期(起)不可空白!!';
    		if (qryOperationDateTo == '')
    		{
    		    if (errorMessage != '') errorMessage = errorMessage + '<br>';
    		    errorMessage = errorMessage + '操作日期(迄)不可空白!!';
    		}
    		
    		
    		var isDoConfirm = false;
    		/* 分公司全選按鈕觸發事件 */
    		$('#queryOperationForm input:checkbox.chk').each(function(){
    			if ( $(this).attr('checked') ){
    				isDoConfirm = true;
                }
            });
                    
            if (isDoConfirm == false)
    		{
				<c:if test="${(actionBean.queryGroup.groupType != 1 && actionBean.queryGroup.groupType != null) || (actionBean.isBankGroupUser == false)}">
    		    	if (errorMessage != '') errorMessage = errorMessage + '<br>';
    		    	errorMessage = errorMessage + '至少選擇一個分公司!!' ;
				</c:if>
    		} 
            
            if (errorMessage != '')
            {
                showErrorMessageDialog(errorMessage);
                return false;
            }
            var menuList = '';
            for(i = 0; i <= 99; i=i+1){
            	var a='menuItemCheckListDiv input:checkbox.chk';
            	a+=i;
			    $('#'+a).each(function(){               
		            				           
					if ( $(this).attr('checked') ){
		            	menuList = menuList +  $(this).val() + ',';
		            }									
		        });
            }
			$('#qryActionBeans').val(menuList);
            
            $('#doQueryBtn2').click();
		});
		
		/* 功能名稱彈出窗口 */
	    $("#qryFunctionbtn").click(function() {  		    
			$("#menuItemCheckListDiv" ).dialog({  
				title:'功能選項' 
				, width: 600
				, resizable: true
				, modal: true
			});
        });

		/* 程式群組點擊的處罰事件 */
		$("[id^='menuItem']").click(function() {
			var menuItemPk = this.id.substring(8);
			checkParent(menuItemPk);
			
		});
				
		/* 程式群組的複選框處罰事件的調用，選中其下程式功能的複選框 */ 
		function   checkParent(menuItemPk)
		{	
			
	    var parentMenuItem='menuItemCheckListDiv input:checkbox.chk';
	    parentMenuItem += menuItemPk;
	    var menuItem = 'menuItem';
	    menuItem += menuItemPk;
		
	    if($('#'+menuItem).attr('checked')) 
	     {
	 
	  	   
				$('#'+parentMenuItem).each(function()
				{ 				
				   $(this).attr('checked', true);
					
		        });		

	      } else{
	  
	        	 $('#'+parentMenuItem).each(function()
				  { 				
					$(this).attr('checked', false);
								
			      });		

	     }
	}	
	
		/* 彈出窗口全選按鈕 */	
		$("#allMenuCheckedBtn").click(function() 
		{
			
			for (i=0; i<=99; i=i+1)
			{
		     var a='menuItemCheckListDiv input:checkbox.chk';
		     a+=i;
			$('#'+a).each(function()
			{ 
				
				$(this).attr('checked', true);
	        });
			}
		});
		
		/* 彈出窗口全不選按鈕 */
		$("#clearMenuCheckedBtn").click(function() {
			for (i=0; i<=99; i=i+1)
			{
		     var a='menuItemCheckListDiv input:checkbox.chk';
		     a+=i;
			$('#'+a).each(function()
			{ 
				
				$(this).attr('checked', false);
	        });
			};
		});
		
		/* 關閉窗口 */
		$("#closeMenuDialogBtn").click(function() {
			$("#menuItemCheckListDiv" ).dialog( "close" );
		});

		//控制分公司 全選按鈕
		$("#qrySelectAllbranch").click(function() {						
			var parentMenuItem='queryOperationForm input:checkbox.chk';		    		    
		    if($(this).attr('checked')) 
		     {				 
					$('#'+parentMenuItem).each(function()
					{ 				
					   $(this).attr('checked', true);
						
			        });			
		      } else{		  
		        	 $('#'+parentMenuItem).each(function()
					  { 				
						$(this).attr('checked', false);									
				      });			
		      }
		});		
		
		/* 用戶群組（GROUP）下拉選單的值改變事件 */
		$('#qrySelectGroup').change(function() {
			//FunctionList的用戶選擇的值保存
            var menuList1 = '';
            for(i = 0; i <= 99; i=i+1){
            	var a='menuItemCheckListDiv input:checkbox.chk';
            	a+=i;
			    $('#'+a).each(function(){               
		            				           
					if ( $(this).attr('checked') ){
		            	menuList1 = menuList1 +  $(this).val() + ',';
		            }									
		        });
            }
			$('#qryActionBeans').val(menuList1);
			
            $('#qrySelectGroupBtn').click();
		});
		
<c:if test="${null != actionBean.queryResult && not empty actionBean.queryResult.paginatedList}">
		$("[id^='a-sortHeader-']").click(function() {
			var sortField = this.id.substring(13);
			$('#hidden\\.queryResult\\.sortCriterion').val(sortField);
			
			var clazz = $(this).attr('class');
			if (null == clazz || 0 == clazz.length)
				$('#hidden\\.queryResult\\.sortDirection').val('1');
			else if ('sortAsc' == clazz)
				$('#hidden\\.queryResult\\.sortDirection').val('1');
			else
				$('#hidden\\.queryResult\\.sortDirection').val('2');
				
			$('#hidden\\.queryResult\\.pageNumber').val('1');
				
			$("#hidden\\.doQueryBtn").trigger('click');
			
			return false;
		});
		
		$("[id^='firstPageBtn']").click(function() {
			$('#hidden\\.queryResult\\.pageNumber').val('1');
			$("#hidden\\.doQueryBtn").trigger('click');
		});
		
		$("[id^='prePageBtn']").click(function() {
			$('#hidden\\.queryResult\\.pageNumber').val('<c:out value="${prePageNumber}"/>');
			$("#hidden\\.doQueryBtn").trigger('click');
		});
		
		$("[id^='nextPageBtn']").click(function() {
			$('#hidden\\.queryResult\\.pageNumber').val('<c:out value="${nextPageNumber}"/>');
			$("#hidden\\.doQueryBtn").trigger('click');
		});
		
		$("[id^='lastPageBtn']").click(function() {
			$('#hidden\\.queryResult\\.pageNumber').val('<c:out value="${lastPageNumber}"/>');
			$("#hidden\\.doQueryBtn").trigger('click');
		});
		
		$("[id^='currentPageText']").change(function() {
			var value = this.value;
			if (value != ''){
				value = value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
				var intRegex = /^\d+$/;
				if(!intRegex.test(value)) {
					showErrorMessageDialog('頁數必須是整數');
					return ;
				}
				
				value = parseInt(value, 10);
				
				if (value < 1){
					showErrorMessageDialog('頁數必須是大於1');
					return ;
				}
				else if (value > <c:out value='${lastPageNumber}'/>){
					showErrorMessageDialog('頁數必須是小於總頁數 (<c:out value="${lastPageNumber}"/>)');
					return ;
				}
				else if (value != <c:out value='${currentPageNumber}'/>){
					$('#hidden\\.queryResult\\.pageNumber').val(value);
					$("#hidden\\.doQueryBtn").trigger('click');
					return false;
				}
				
			}
			else{
				showErrorMessageDialog('頁數不可為空白)');
				return ;
			}
		});
		
		$('#doExportExcelBtn').click(function() {
			$("#hidden\\.doExportExcelBtn").trigger('click');
		});
    		
		
</c:if>
		
		<c:if test="${not empty actionBean.message}">
    	showMessageDialog('<c:out value="${actionBean.message }" escapeXml="false"/>');
    	</c:if>
		
    	
    	var dates = $( "#qryOperationDateFrom, #qryOperationDateTo" ).datepicker({
			defaultDate: "-1m",
			changeMonth: true,
			changeYear: true,
			numberOfMonths: 1,
			dateFormat: 'yy/mm/dd',
			showButtonPanel: true,
			showOn: "both",
			buttonImage: "<c:url value='styles/default/image/calendar.gif'/>",
			buttonImageOnly: true,
			onSelect: function( selectedDate ) {
				var option = this.id == "qryOperationDateFrom" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" );
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
                  
    });
    
    function doPrintEvent()
    {
    	divPrint('listForm');
    	return false;
    }

    //-->
    </script>
</head>
<body>
	


<stripes:form id="queryOperationForm" beanclass="com.feib.stms.action.Stms9012ActionBean" method="post" onsubmit="javascript: waitingDialog({});">

	<div id="queryForm">
		<table>
			<tr>
				<td colspan="5" class="queryHeader">請輸入查詢條件</td>
			</tr>
			<tr>
				<th>操作日期<span id="mustKeyInStar">**</span></th>
				<td colspan="4">
				<stripes:text id="qryOperationDateFrom" name="qryOperationDateFrom" size="10" maxlength="10" formatPattern="yyyy/MM/dd" readonly="true"/>
				<stripes:select id="qryOperationDateHourFrom" name="qryOperationDateHourFrom">
					<stripes:option value="0" label="00"/>
					<stripes:option value="1" label="01"/>
					<stripes:option value="2" label="02"/>
					<stripes:option value="3" label="03"/>
					<stripes:option value="4" label="04"/>
					<stripes:option value="5" label="05"/>
					<stripes:option value="6" label="06"/>
					<stripes:option value="7" label="07"/>
					<stripes:option value="8" label="08"/>
					<stripes:option value="9" label="09"/>
					<stripes:option value="10" label="10"/>
					<stripes:option value="11" label="11"/>
					<stripes:option value="12" label="12"/>
					<stripes:option value="13" label="13"/>
					<stripes:option value="14" label="14"/>
					<stripes:option value="15" label="15"/>
					<stripes:option value="16" label="16"/>
					<stripes:option value="17" label="17"/>
					<stripes:option value="18" label="18"/>
					<stripes:option value="19" label="19"/>
					<stripes:option value="20" label="20"/>
					<stripes:option value="21" label="21"/>
					<stripes:option value="22" label="22"/>
					<stripes:option value="23" label="23"/>						
					<stripes:option value="24" label="24"/>
				</stripes:select>
					～
				<stripes:text id="qryOperationDateTo" name="qryOperationDateTo" size="10" maxlength="10" formatPattern="yyyy/MM/dd" readonly="true"/>
				<stripes:select id="qryOperationDateHourTo" name="qryOperationDateHourTo">
					<stripes:option value="0" label="00"/>
					<stripes:option value="1" label="01"/>
					<stripes:option value="2" label="02"/>
					<stripes:option value="3" label="03"/>
					<stripes:option value="4" label="04"/>
					<stripes:option value="5" label="05"/>
					<stripes:option value="6" label="06"/>
					<stripes:option value="7" label="07"/>
					<stripes:option value="8" label="08"/>
					<stripes:option value="9" label="09"/>
					<stripes:option value="10" label="10"/>
					<stripes:option value="11" label="11"/>
					<stripes:option value="12" label="12"/>
					<stripes:option value="13" label="13"/>
					<stripes:option value="14" label="14"/>
					<stripes:option value="15" label="15"/>
					<stripes:option value="16" label="16"/>
					<stripes:option value="17" label="17"/>
					<stripes:option value="18" label="18"/>
					<stripes:option value="19" label="19"/>
					<stripes:option value="20" label="20"/>
					<stripes:option value="21" label="21"/>
					<stripes:option value="22" label="22"/>
					<stripes:option value="23" label="23"/>						
					<stripes:option value="24" label="24"/>
				</stripes:select>
				</td>
			</tr>
			<c:if test="${actionBean.isBankGroupUser}">
				<tr>
					<th>欲操作的群組</th>
					<td colspan="4">
						<stripes:select id="qrySelectGroup" name="qrySelectGroup">
							<c:forEach items="${actionBean.selectedGroup}" var="selectedGroupObj" varStatus="rowstat">
								<stripes:option value="${selectedGroupObj.value}" label="${selectedGroupObj.label}" />
							</c:forEach>				
						</stripes:select>
						<stripes:submit name="doSelectGroup" id="qrySelectGroupBtn" style="display: none"/>
						
					</td>
				</tr>
			</c:if>
			
<!--			<tr>-->
				<stripes:text id="queryGroup.groupType" name="queryGroup.groupType" style="display: none"/>
<!--			</tr>-->
			
			<c:if test="${(actionBean.queryGroup.groupType != 1 && actionBean.queryGroup.groupType != null) || (actionBean.isBankGroupUser == false)}">
				<tr>
					<th>分公司<span id="mustKeyInStar">**</span></th>
					<td colspan="4">
						<stripes:checkbox id="qrySelectAllbranch" name="qrySelectAllbranch" />全選&nbsp;					
						<c:forEach items="${actionBean.branch}" var="branchObj" varStatus="rowstat">
							<stripes:checkbox class="chk" id="qryBranch[${rowstat.index}]" name="qryBranch[${rowstat.index}]" value="${branchObj.value}"/> <c:out value="${branchObj.label}" />&nbsp;
						</c:forEach>	
					</td>
				</tr>
			</c:if>
			
			<tr>
				<th>使用者ID</th>
				<td colspan="4"><stripes:text id="qryUserId" name="qryUserId" size="10" maxlength="10" /></td>
			</tr>
			<tr>
				<th>功能名稱</th>
				<td colspan="4">
					<div id="qryFunctionbtn" class="widgetsIcon ui-state-default ui-corner-all" title="查詢">
						<span class="ui-icon ui-icon-circle-triangle-e"></span>
					</div>
				</td>
			</tr>			
			<tr>
				<td colspan="5" class="queryFunction">
					<stripes:hidden id="qryActionBeans" name="qryActionBeans"/>
					<stripes:button id="doQueryBtn" name="doQuery" value="查詢" class="formBtn" />
					<stripes:submit  style="display:none" id="doQueryBtn2" name="doQuery" />
				</td>
			</tr>
		</table>
	</div>
	
	
	<!-- 彈出的功能名稱窗口,目前未處理完成.存在問題 -->
	<div id="menuItemCheckListDiv" style="display: none;">
			<table>
				<c:set var="cyb" value="${0}" />
				<c:forEach items="${actionBean.functionsList}" var="viewObj" varStatus="rowstat">
					<c:forEach items="${viewObj}" var="tempObj" varStatus="rowstat1" begin="0" end="0">
			            	<tr>
			            		<th align="left">
			            			<input name="checkMenuItem[${rowstat.index}]" type="checkbox" id="menuItem${rowstat.index}" <c:if test="${tempObj.checked }">checked="checked"</c:if> value="<c:out value='${tempObj.value}'/>"  class="chk${rowstat.index}" />	            		
			            			<c:out value="${tempObj.label}"/>
			            		</th>
			            	</tr>
			         </c:forEach>
		            	<tr>
		            		<td>
		            			<c:set var="cnt" value="${1}"/>
		            			<c:forEach items="${viewObj}" var="subViewObj" varStatus="subRowstat" begin="1">
		            				<c:if test="${cnt > 4}"> <c:set var="cnt" value="${1}"/><br/></c:if>
		            				<c:if test="${cnt == 1}">&nbsp;&nbsp;&nbsp;</c:if>
		            					&nbsp;<input name="qryFunctions[${cyb}]" type="checkbox" id="parentMenuItem${subRowstat.index}" <c:if test="${subViewObj.checked }">checked="checked"</c:if> value="<c:out value='${subViewObj.value}'/>" class="chk${rowstat.index}"/>
	            						<c:out value="${subViewObj.label}"/>
	            						<c:set var="cnt" value="${cnt + 1}"/>
  							            <c:set var="cyb" value="${cyb + 1}"/>
	            				</c:forEach>
		            		</td>
		            	</tr>
				</c:forEach>
			
				<tr>
					<td align="center">
						<input type="button" id="allMenuCheckedBtn" value="全選">
						<input type="button" id="clearMenuCheckedBtn" value="全不選">
						<input type="button" id="closeMenuDialogBtn" value="離開">				
					</td>
				</tr>
			</table>
	</div>
</stripes:form>	

	
	<div id="listForm">
	
<c:if test="${null != actionBean.queryResult && not empty actionBean.queryResult.paginatedList}">
		
		<div id="paginationBar">
			<input type="button" id="firstPageBtn" class="formBtn" value="第一頁" <c:out value='${prePageNumber<=0 ? "disabled": "" }'/> />
			<input type="button" id="prePageBtn" class="formBtn" value="上一頁" <c:out value='${prePageNumber<=0 ? "disabled": "" }'/> />
			第 <input type="text" id="currentPageText" class="formBtn" value="${currentPageNumber }" size="3" maxlength="4"> / ${lastPageNumber} 頁
			<input type="button" id="nextPageBtn" class="formBtn" value="下一頁" <c:out value='${lastPageNumber<nextPageNumber ? "disabled": "" }'/> />
			<input type="button" id="lastPageBtn" class="formBtn" value="最末頁" <c:out value='${lastPageNumber<=currentPageNumber ? "disabled": "" }'/> />
		</div>
                <table id="queryResultTable">
                	<thead>
                    <tr>
                    	<!-- 序號 -->
                        <th>序號</th>
                        <!-- 操作日期 -->
                        <th><a id='a-sortHeader-inDateTime' href='javascript:void(0);' class="<c:out value='${inDateTimeSortedClass }'/>"> <c:out value='${inDateTimeSortedSpan }' escapeXml="false"/>操作日期</a> </th>
                        <!-- 時間 -->
                        <th>時間</th>
                        <!-- 功能模組 -->
                        <th><a id='a-sortHeader-parentActionName' href='javascript:void(0);' class="<c:out value='${parentActionNameSortedClass }'/>"> <c:out value='${parentActionNameSortedSpan }' escapeXml="false"/>功能模組</a></th>
                        <!-- 功能名稱 -->
                        <th><a id='a-sortHeader-actionName' href='javascript:void(0);' class="<c:out value='${actionNameSortedClass }'/>"> <c:out value='${actionNameSortedSpan }' escapeXml="false"/>功能名稱</a></th>
                        <!-- 操作內容 -->
                        <th><a id='a-sortHeader-eventName' href='javascript:void(0);' class="<c:out value='${eventNameSortedClass }'/>"> <c:out value='${eventNameSortedSpan }' escapeXml="false"/>操作內容</a></th>
                        <!-- 來源IP -->
                        <th><a id='a-sortHeader-remoteAddr' href='javascript:void(0);' class="<c:out value='${remoteAddrSortedClass }'/>"> <c:out value='${remoteAddrSortedSpan }' escapeXml="false"/>來源IP</a></th>
                        <!-- 使用者ID -->
                        <th><a id='a-sortHeader-userId' href='javascript:void(0);' class="<c:out value='${userIdSortedClass }'/>"> <c:out value='${userIdSortedSpan }' escapeXml="false"/>使用者ID</a></th>
                        <!-- 分公司 -->
                        <th><a id='a-sortHeader-securities' href='javascript:void(0);' class="<c:out value='${securitiesSortedClass }'/>"> <c:out value='${securitiesSortedSpan }' escapeXml="false"/>分公司</a></th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${actionBean.queryResult.paginatedList}" var="viewObj" varStatus="rowstat">
                    <tr>
                    	<!-- 序號 -->
                        <td align="right"><c:out value='${ rowstat.index + 1 }'/></td>
                      	<!-- 操作日期 -->
                        <td align="center"><fmt:formatDate value="${viewObj.inDateTime}" pattern="yyyy/MM/dd" /></td>
                        <!-- 時間 -->
                        <td align="center"><fmt:formatDate value="${viewObj.inDateTime}" pattern="HH:mm:ss" /></td>
                        <!-- 功能模組 -->
                        <td><c:out value="${viewObj.parentActionName }" /> </td>
                        <!-- 功能名稱 -->
                        <td><c:out value="${viewObj.actionName }" /> </td>
                        <!-- 操作內容 -->
                        <td><c:out value="${viewObj.chiEventName }" /></td>
                        <!-- 來源IP -->
                        <td><c:out value="${viewObj.remoteAddr }" /> </td>
                        <!-- 使用者ID -->
                        <td><c:out value="${viewObj.userId }" /> </td>
                        <!-- 分公司 -->
                        <td><c:out value="${viewObj.securities.securitiesName }" /> </td>
                    </tr>
                    </c:forEach>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="9" class="listFunction"><input id="doExportExcelBtn" type="button" value="匯出Excel" class="formBtn"/>&nbsp;<input type="button" value="列印" onclick="javascript:doPrintEvent();" class="formBtn"/></td>
                    </tr>
                    </tfoot>
                </table>
</c:if>
                
	</div>

<div style="display: none;">
<stripes:form id="hidden.queryOperationForm" beanclass="com.feib.stms.action.Stms9012ActionBean" method="post" >
	<stripes:hidden id="hidden.qryOperationDateFrom" name="qryOperationDateFrom" formatPattern="yyyy/MM/dd"/>
	<stripes:hidden id="hidden.qryOperationDateHourFrom" name="qryOperationDateHourFrom" />
	<stripes:hidden id="hidden.qryOperationDateTo" name="qryOperationDateTo" formatPattern="yyyy/MM/dd" />
	<stripes:hidden id="hidden.qryOperationDateHourTo" name="qryOperationDateHourTo" />
	<stripes:hidden id="hidden.qryUserId" name="qryUserId" />
	<stripes:hidden id="hidden.qrySelectAllbranch" name="qrySelectAllbranch" />
	<c:forEach items="${actionBean.branch}" var="branchObj" varStatus="rowstat">
		<stripes:hidden id="hidden.qryBranch[${rowstat.index}]" name="qryBranch[${rowstat.index}]"/>
	</c:forEach>
	<stripes:hidden id="hidden.qryActionBeans" name="qryActionBeans"/>
	<stripes:hidden id="hidden.qrySelectGroup" name="qrySelectGroup"/>
	<stripes:hidden id="hidden.queryResult.pageNumber" name="queryResult.pageNumber" />
	<stripes:hidden id="hidden.queryResult.sortCriterion" name="queryResult.sortCriterion" />
	<stripes:hidden id="hidden.queryResult.sortDirection" name="queryResult.sortDirection" />
	<stripes:submit id="hidden.doQueryBtn" name="doQuery" value="查詢" class="formBtn"/>
	<stripes:submit id="hidden.doExportExcelBtn" name="doExportExcel" value="匯出Excel" class="formBtn"/>
	<stripes:errors></stripes:errors>
</stripes:form>
</div>
</body>
</html>
